package com.xx.happychatboot.middleware.netty.service;

import com.xx.happychatboot.middleware.netty.domain.vo.response.WebSocketResponse;
import com.xx.happychatboot.middleware.rocketmq.domain.dto.RocketMqCommonDto;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

public interface WebSocketService {

    /**
     * 保存连接
     *
     * @param channel
     * @param username
     * @param username
     */
    void saveConnect(Channel channel, String username);

    /**
     * 发送消息
     * @param channel
     * @param webSocketResponse
     */
    void sendMsg(Channel channel, WebSocketResponse<?> webSocketResponse);

    /**
     * 执行对应rocketmq操作
     * @param rocketMqCommonDto
     */
    void rocketMqExecute(RocketMqCommonDto rocketMqCommonDto);
}
